package com.tensquare.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by WF on 2019/9/21 10:13
 * Exchange类型为topic的消息类型
 */
@Component
@RabbitListener(queues = "hlm")
public class MyListenerTopic02 {

    @RabbitHandler
    public void getMessage(String msg){
        System.out.println("【hlm接收消息】:" + msg);
    }
}
